#if !defined(AFX_DDThread_H__INCLUDED_)
#define AFX_DDThread_H__INCLUDED_

#include "DDCriticalSection.h"
#include <stdio.h>
#include <pthread.h>
#include <semaphore.h>

class DDThread
{
public:
	DDThread(void);
	~DDThread(void);

public:
	BOOL DDThdInit();     /*Init thread*/
	BOOL DDThdUnInit();   /*UnInit thread*/

public:
	virtual int DDThdDispatch() = 0;

private:
	static VOID* _DDThreadThd( VOID *pVoid );

public:
	BOOL       m_bThreadRun;            /*�߳���������*/

private:
	pthread_t  m_tThrd, *m_pThrd;      //�����߳�
	sem_t      m_tEvent,*m_pEvent;     //�߳��ź�

};

#endif
